<?php

// $email = "fsef@qq.com";
// $email = "fsef@qq.c0m.cn";
// $email = "fsef@qq.wang";

// $preg = "/^([a-z0-9]{1,2}|[a-z0-9][a-z0-9_]+[a-z0-9])@([a-z0-9]{1,2}|[a-z0-9][a-z0-9-]+[a-z0-9])(\.[a-z]{2,})+$/";

// $c= preg_match($preg, $email);

// var_dump($c);


// $id = "445281198612251877";

// $id = "44528119861225187x";

// $preg = "/^[1-9]\d{5}(19\d{2}|20(0\d|1[0-9]))(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[0-1])\d{3}[0-9x]$/";

// $c= preg_match($preg, $id);
// 
// var_dump($c);



// $data = file_get_contents("https://www.lagou.com/");


$preg= "/<a href=\"https:\/\/www\.lagou\.com\/zhaopin\/.+?\" data-lg-tj-id=\".+?\" data-lg-tj-no=\".+?\" data-lg-tj-cid=\".+?\".*?>(.+?)<\/a>/";



$data  =  file_get_contents("https://www.lagou.com/jobs/5527491.html");


$preg= "/<div class=\"job-name\" title=\"(.+?)\">.+?<span class=\"salary\">(.+?)<\/span>.+?<span>(.+?)<\/span>.+?<div class=\"job-detail\">(.+?)<\/div>.+?<div class=\"job_company_content\">.+?<em class=\"fl-cn\">(.+?)<\/em>/s";



$c = preg_match_all($preg,$data,$out);
// 



var_dump($c,$out);

